const homeData = require('./mock/index.json')
const detailData = require('./mock/detail.json')
const cityData = require('./mock/city.json')


module.exports = {
    devServer:{
        before(app){
           app.get('/api/home',function(req,res){
               res.json({
                   errno:0,
                   data: homeData
               })
           }) 
            app.get('/api/detail', function (req, res) {
                res.json({
                    errno: 0,
                    data: detailData
                })
            })
             app.get('/api/city', function (req, res) {
                 res.json({
                     errno: 0,
                     data: cityData
                 })
             })
        }
    }
}